import ChildOne from '@/components/EventBus/ChildOne';
<template>
  <div>
    <h3>app</h3>
    <child-one ref="childOneRef"></child-one>
    <child-two></child-two>
  </div>
</template>

<script>
import ChildOne from "@/components/ChildOne";
import ChildTwo from "@/components/ChildTwo";
export default {
  data() {
    return {
      info: "我是app",
      money: "1个亿",
    };
  },
  //
  provide() {
    return {
      jiachan: this.money,
    };
  },
  mounted() {
    console.log(this.$refs.childOneRef);
    // ref在普通的DOM元素上标记，指向的是当前的DOM元素
    // ref在组件标签上进行标记时，它指向的是当前的组件对象
    console.log(this.$refs.childOneRef.info);
  },
  components: {
    ChildOne,
    ChildTwo,
  },
};

/* 
ref  子传父
$parent 父传子
$children 子传父
provide inject(父级组件传递给子级组件)

$attrs


*/
</script>

<style lang="scss" scoped>
</style>